package com.lanou.dllo.findfood.activity;


import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;

import com.lanou.dllo.findfood.R;

import cn.jpush.android.api.JPushInterface;

/**
 * Created by dllo on 15/10/20.
 */
public class SplashActivity extends Activity {
    private Handler handler;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_splash);
        handler = new Handler(new Handler.Callback() {
            @Override
            public boolean handleMessage(Message msg) {
                Intent intent = new Intent(SplashActivity.this,ISLoginActivity.class);
                startActivity(intent);
                finish();
                return false;
            }
        });
       handler.sendEmptyMessageDelayed(100,3000);

        //用户自定义的广播
        Intent intent = new Intent();

        sendOrderedBroadcast(intent, null);//后一个参数表示权限



    }

    @Override
    protected void onResume() {
        super.onResume();
        JPushInterface.onResume(this);
    }

    @Override
    protected void onPause() {
        super.onPause();
        JPushInterface.onPause(this);
    }
}
